import { defineComponent, provide } from 'vue';

<%_ if (generateBuiltInUserEntity) { %>
import UserService from '@/entities/user/user.service';
<%_ } _%>
<%_ for (entity of entities.filter(entity => !entity.embedded)) { _%>
import <%= entity.entityAngularName %>Service from './<%= entity.entityFolderName %>/<%= entity.entityFileName %>.service';
<%_ } _%>
// jhipster-needle-add-entity-service-to-entities-component-import - JHipster will import entities services here

export default defineComponent({
  name: 'Entities',
  setup() {
<%_ if (generateBuiltInUserEntity) { %>
    provide('userService', () => new UserService());
<%_ } _%>
<%_ for (entity of entities.filter(entity => !entity.embedded)) { _%>
    provide('<%= entity.entityInstance %>Service', () => new <%= entity.entityAngularName %>Service());
<%_ } _%>
    // jhipster-needle-add-entity-service-to-entities-component - JHipster will import entities services here
  },
});
